package com.leapcloud.crm.assist.controller;


import com.leapcloud.crm.core.dao.JooqDao;
import com.leapcloud.crm.core.jooq.tables.pojos.VtigerLeaddetails;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wangzhenyan
 * @date 2018/12/26下午7:03
 */
@RestController
@RequestMapping("/test")
@Api(description = "test控制层api入口")
public class TestController {

  @Autowired
  private JooqDao jooqDao;

  @GetMapping(value = "/list", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
  @ApiOperation(value = "list方法value")
  public List findList() {
    List<VtigerLeaddetails> list = jooqDao.findList();
    return list;
  }

}
